package com.mdd.common.entity.zdjd.dto;

import com.mdd.common.entity.zdjd.TZdjdAgent;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@ApiModel("代理商排名DTO")
public class AgentRankDTO implements Serializable {

    @ApiModelProperty(value = "代理商名称")
    private String agentName;

    @ApiModelProperty(value = "代理商设备总数量（台）")
    private Integer agentDeviceTotalAmount;

    public static AgentRankDTO convert(TZdjdAgent agent) {
        AgentRankDTO agentRankDTO = new AgentRankDTO();
        agentRankDTO.setAgentName(agent.getName());
        agentRankDTO.setAgentDeviceTotalAmount(agent.getDeviceTotalAmount());
        return agentRankDTO;
    }

}
